/* ==================== 全局基础样式 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    /* 防止文字选择 - 添加所有浏览器前缀 */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* ==================== 布局容器 ==================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* ==================== 登录表单区域 ==================== */
.login-container {
    max-width: 400px;
    margin: 0 auto;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    /* 模糊背景效果 - 添加Safari支持 */
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.login-container h1 {
    color: #2563eb;
    margin-bottom: 20px;
    /* 文字换行处理 */
    word-break: break-word;
    overflow-wrap: break-word;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
    hyphens: auto;
}

/* ==================== 表单元素 ==================== */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.login-form input {
    padding: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    /* 宽度兼容性处理 */
    width: 100%;
    min-width: 0;
    /* 移除不支持的属性，使用标准属性 */
}

.login-form button {
    padding: 10px;
    background-color: #2563eb;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    font-size: 16px;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.login-form button:hover {
    background-color: #1e40af;
}

/* ==================== 滚动条样式 ==================== */
.scrollbar-custom {
    overflow-y: auto;
    overflow-x: hidden;
    /* 使用基础滚动条样式 */
    -webkit-overflow-scrolling: touch;
}

/* ==================== 文字装饰 ==================== */
.text-decorated {
    text-decoration: underline;
    /* 移除不支持的属性 */
}

/* ==================== 媒体查询 - 响应式设计 ==================== */
@media (max-width: 768px) {
    .login-container {
        padding: 15px;
        margin: 10px;
    }

    /* 移动端优化 */
    * {
        -webkit-tap-highlight-color: transparent;
    }
}

/* ==================== 动画优化 ==================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-out forwards;
    will-change: transform, opacity;
}

/* ==================== 打印样式 ==================== */
@media print {
    .login-container {
        box-shadow: none;
        background-color: transparent;
    }

    .login-form button {
        background-color: transparent;
        color: black;
        border: 1px solid #000;
    }
}